#pragma once

#pragma pack(4)

struct NetPacketHeader
{
	unsigned short		wDataSize;	
	unsigned short		wOpcode;	
};


enum eNetOpcode
{
    NET_LOGIN			= 1,
    REP_LOGIN,
    REP_EMPLOYEE,
    NET_MSG,
    REP_MSG,
    NET_TIMELIVE,
    NET_VIDEO,
    NET_FILE
};

struct NetPacket_Login
{
	char    uid[16];	
	char	arrMessage[512];
};

struct NetPacket_RepLogin
{
	char    uid[16];	
	char	arrMessage[512];
};

struct NetPacket_RepEmployee
{	
	char arrMessage[1024];
};


struct NetPacket_RepMsg
{
    int ret; //1:已送达 0:未送达
    char to[16];
    char msgid[16];
};

struct NetPacket_MsgData
{
    int flag; // 0:有分页；1:最后一页
    char msgid[16];
    char to[16];
    char from[16];
    char sendMessage[1024];    
};

struct NetPacket_TimeLive
{
    long   curtime;
    char    uid[16];    
};

struct NetPacket_VideoBuf
{
    int count;
    int flag;
    char to[16];
    char from[16];
    char buf[BUFFER_SIZE];    
};

struct NetPacket_File
{    
    int psize; // 共多少份
    int pidx; //当前第几份
    int filesize;
    int csize; 
    char fileid[16];
    char to[16];
    char from[16];
    char filename[256];
    char data[FILE_SIZE];    
};